﻿<phone:PhoneApplicationPage 
	xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
	xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
	xmlns:phone="clr-namespace:Microsoft.Phone.Controls;assembly=Microsoft.Phone"
	xmlns:shell="clr-namespace:Microsoft.Phone.Shell;assembly=Microsoft.Phone"
	xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
	xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
	xmlns:nytimes="clr-namespace:NYTimes;assembly=NYTimesSilverlightKit"
	xmlns:Microsoft_Phone_Controls_Maps="clr-namespace:Microsoft.Phone.Controls.Maps;assembly=Microsoft.Phone.Controls.Maps"
	mc:Ignorable="d" d:DesignWidth="480" d:DesignHeight="800"
	x:Class="MostPopular.MapPage"
	FontFamily="{StaticResource PhoneFontFamilyNormal}"
	FontSize="{StaticResource PhoneFontSizeNormal}"
	Foreground="{StaticResource PhoneForegroundBrush}"
	Orientation="Portrait"
	shell:SystemTray.IsVisible="True" Loaded="PhoneApplicationPage_Loaded"
	d:DataContext="{d:DesignInstance nytimes:MostPopular, IsDesignTimeCreatable=True}" SupportedOrientations="PortraitOrLandscape">

	<!--LayoutRoot is the root grid where all page content is placed-->
	<Grid x:Name="LayoutRoot" Background="Transparent" d:DataContext="{Binding Results[3]}">
		<Grid.RowDefinitions>
			<RowDefinition Height="Auto"/>
			<RowDefinition Height="*"/>
		</Grid.RowDefinitions>
		
		<!--TitlePanel contains the name of the application and page title-->
		<StackPanel x:Name="TitlePanel" Grid.Row="0" Margin="12,17,0,28">
			<TextBlock x:Name="ApplicationTitle" Text="New York Times Most Popular" Style="{StaticResource PhoneTextNormalStyle}"/>
			<Grid Height="96" Margin="9,0" >
				<Grid.ColumnDefinitions>
					<ColumnDefinition Width="Auto"/>
					<ColumnDefinition/>
				</Grid.ColumnDefinitions>
				<TextBlock x:Name="PageTitle" Text="map" Margin="0" Style="{StaticResource PhoneTextTitle1Style}" HorizontalAlignment="Left" d:LayoutOverrides="Height"/>
				<TextBlock x:Name="ArticleTitle" Text="{Binding Title}" VerticalAlignment="Center" TextWrapping="Wrap" d:LayoutOverrides="Width" Grid.Column="1" Margin="8,0,0,0"/>
			</Grid>
		</StackPanel>

		<!--ContentPanel - place additional content here-->
		<Grid x:Name="ContentPanel" Grid.Row="1" Margin="12,0,12,0">
            <!-- The CredentailProvider should be replaced with an application id from https://www.bingmapsportal.com/ -->
			<Microsoft_Phone_Controls_Maps:Map x:Name="Map"  d:LayoutOverrides="Width, Height" CredentialsProvider="ArIK56OvkZRlZRfNKrnYVhfYqMs-Vh017JF_M7txDJLZXeGzyMCqcOFLY6VoF2eC">
                <Microsoft_Phone_Controls_Maps:Map.Children>
                    <Microsoft_Phone_Controls_Maps:MapLayer x:Name="Locations"/>
                </Microsoft_Phone_Controls_Maps:Map.Children>
			</Microsoft_Phone_Controls_Maps:Map>
		</Grid>
	</Grid>
</phone:PhoneApplicationPage>